package com.example.mythealthapp.me

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.ImageView
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.RecyclerView
import com.example.mythealthapp.R
import com.example.mythealthapp.databinding.ItemMeBinding
import com.example.mythealthapp.users.User

class MeAdapter (users:User) :  RecyclerView.Adapter<MeAdapter.usersViewHolder>() {


    val user= users


    inner class usersViewHolder(binding: ItemMeBinding) : RecyclerView.ViewHolder(binding.root){
        val mBinding:ItemMeBinding=binding
    }

    override fun onCreateViewHolder(
        parent: ViewGroup,
        viewType: Int
    ): MeAdapter.usersViewHolder {

        val binding = DataBindingUtil.inflate<ItemMeBinding>(LayoutInflater.from(parent.context),
            R.layout.item_me,parent,false)

        return usersViewHolder(binding)
    }

    override fun onBindViewHolder(holder: MeAdapter.usersViewHolder, position: Int) {
        holder.mBinding.user=user

    }

    override fun getItemCount(): Int {
        return 1
    }


}